package com.tjut.oop.hol5;

public class Gardener {
	//判断输入的水果名
	public void judge(String fruitName) {
		 if (fruitName.equals("苹果")) {
			Apple al = new Apple();
			al.show();
		} else if (fruitName.equals("香蕉")) {
			Banana ban = new Banana();
			ban.show();
		} else if (fruitName.equals("葡萄")) {
			Grape gra = new Grape();
			gra.show();
		} else
			System.out.println("请重新输入水果名。。。");
	}

	public Gardener() {
		super();
	}

}
